<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 18-1-12
 * Time: 下午1:59
 */

namespace common\models;


use common\components\loan\Api;
use common\components\loan\RongYiXing;
use yii\base\ErrorException;

class LoanApply extends \common\models\base\LoanApply
{
    /**
     * @param $company_code
     * @return Api $plat_form
     */
    public static function getPlatForm($company_code)
    {
        switch ($company_code){
            case RongYiXing::COMPANY_CODE:
                $plat_form = new RongYiXing();
                break;
            default:
                throw new ErrorException("没有找到贷款公司");
                break;
        }
        return $plat_form;
    }
}